#!/usr/bin/python3

from tkinter import *

class App():
    '''use radiobutton'''
    def __init__(self):
        self.root = Tk()
        self.value = IntVar()
        pass

    def initRadioButton(self):
        '''radio button share the only variable in the same group'''
        '''and it is required to use different value'''
        self.frame1 = Frame(self.root)
        Radiobutton(self.frame1, text='one', variable=self.value, value=1).pack(anchor=W)
        Radiobutton(self.frame1, text='two', variable=self.value, value=2).pack(anchor=W)
        Radiobutton(self.frame1, text='three', variable=self.value, value=3).pack(anchor=W)
        self.frame2 = Frame(self.root)
        Radiobutton(self.frame2, text='one', variable=self.value, value=1, indicatoron=False).pack(anchor=W, fill=X)
        Radiobutton(self.frame2, text='two', variable=self.value, value=2, indicatoron=False).pack(anchor=W, fill=X)
        Radiobutton(self.frame2, text='three', variable=self.value, value=3, indicatoron=False).pack(anchor=W, fill=X)

    def run(self):
        self.initRadioButton()
        self.frame1.pack()
        self.frame2.pack()
        self.root.mainloop()

if __name__ == "__main__":
    app = App()
    app.run()
